#ifndef QXGAME_SINGLETON_H
#define QXGAME_SINGLETON_H

template<typename T>
class Singleton {
public:
    Singleton(const Singleton &) = delete;
    Singleton(const Singleton &&) = delete;
    Singleton &operator=(const Singleton &) = delete;
    Singleton &operator=(const Singleton &&) = delete;

    static T &Instance()
    {
        static T instance;
        return instance;
    }

protected:
    Singleton() = default;
    ~Singleton() = default;
};

#endif // QXGAME_SINGLETON_H
